# 通用装饰器的写法
import time


def decorator(fn):
    def inner(*args,**kwargs):
        print('log  '+time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()))
        return fn(*args,**kwargs)
    return inner

@decorator
def add1(num1,num2):
    print(num1+num2)

add1(9,10)